<?php

App::uses('Category', 'Model');
$urlIndex = $this->Html->url(array('controller' => $category['Category']['controller'], 'action' => $category['Category']['action']));
$urlCertifications = $this->Html->url(array('controller' => 'Certifications', 'action' => 'index'));
$urlCertificationsAbout = $this->Html->url(array('controller' => 'Certifications', 'action' => 'about_to_expire'));
$urlTrainings = $this->Html->url(array('controller' => 'Trainings', 'action' => 'index'));
$urlChangePass = $this->Html->url(array('controller' => 'Users', 'action' => 'changePassForm'));
$urlLogout = $this->Html->url(array('controller' => 'Sesion', 'action' => 'logout'));
$urlRegTests = $this->Html->url(array('controller' => 'TestRegister', 'action' => 'admin'));
$urlHistory = $this->Html->url(array('controller' => 'Trainings', 'action' => 'evaluations'));
$urlKardex = $this->Html->url(array('controller' => 'Kardex', 'action' => 'index'));
$name = $authUser['full_name'];
$nom = $authUser['nomina'];
?>

<ul class="nav navbar-nav navbar-left">
    <li>
        <a href="<?php echo $urlIndex; ?>">
            Entrena<span class="kaushan">Te!</span>
        </a>
    </li>
    <!--Inicio menu de cursos-->
    <li class="dropdown">
        <a class="dropdown-toggle" aria-expanded="true" role="button" data-toggle="dropdown">
            <i class='fa fa-graduation-cap'></i>
            <?php echo __('Cursos'); ?>
            <span class="caret"></span>
        </a>
        <ul class="dropdown-menu" role="menu">
            <li>
                <a href="<?php echo $urlRegTests; ?>">
                    <i class='fa fa-sign-in'></i>
                    <?php echo __('Inscripciones'); ?>
                </a>
            </li>
            <li>
                <a href="<?php echo $urlHistory; ?>">
                    <i class='fa fa-list'></i>
                    <?php echo __('Historial'); ?>
                </a>
            </li>
        </ul>
    </li>
    <!--Fin menu cursos-->
    <li class="dropdown">
        <a class="dropdown-toggle" aria-expanded="true" role="button" data-toggle="dropdown">
            <i class='fa fa-certificate'></i>
            <?php echo __('Certificaciones'); ?>
            <span class="caret"></span>
        </a>
        <ul class="dropdown-menu" role="menu">
            <li>
                <a href="<?php echo $urlCertifications; ?>">
                    <i class='fa fa-certificate' style="color: #0f0;"></i>
                    <?php echo __('Vigentes'); ?>
                </a>
            </li>
            <li>
                <a href="<?php echo $urlTrainings; ?>">
                    <i class='fa fa-flag' style="color: #f00;"></i>
                    <?php echo __('En curso'); ?>
                </a>
            </li>
        </ul>
    </li>
    <li>
        <a href="<?php echo $urlKardex; ?>">
            <i class='fa fa-credit-card'></i>
            <?php echo __('Kardex'); ?>
        </a>
    </li>
</ul>
<ul class="nav navbar-nav navbar-right">
    <li class="dropdown">
        <a class="dropdown-toggle" aria-expanded="true" role="button" data-toggle="dropdown" title="<?php echo $name; ?>">
            <?php //echo $this->Html->image('workers/' . $info['user']['nomina'] . '.jpg', array('height' => '30px')); ?>
            <?php echo $nom; ?>
            <span class="caret"></span>
        </a>
        <ul class="dropdown-menu" role="menu">
            <li>
                <a href="<?php echo $urlChangePass; ?>">
                    <i class='fa fa-edit'></i>
                    <?php echo __('Cambiar contraseña'); ?>
                </a>
            </li>
            <li>
                <a href="<?php echo $urlLogout; ?>">
                    <i class='fa fa-sign-out'></i>
                    <?php echo __('Cerrar sesión'); ?>
                </a>
            </li>
        </ul>
    </li>
</ul>
